<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title><?php echo ($seo["title"]); ?></title>
<meta http-equiv="x-ua-compatible" content="ie=7" />
<meta name="keywords" content="<?php echo ($seo["keys"]); ?>" />
<meta name="description" content="<?php echo ($seo["desc"]); ?>" />
<?php if(is_array($sty)): $i = 0; $__LIST__ = $sty;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$styshow): $mod = ($i % 2 );++$i;?><link href="__TMPL__Public/css/<?php echo ($styshow); ?>.css" type="text/css" rel="stylesheet" /><?php endforeach; endif; else: echo "" ;endif; ?>
<script src="__PUBLIC__/statics/js/jquery/jquery-1.7.2.min.js"></script>
<script src="__PUBLIC__/statics/js/ThinkAjax.js"></script>
<script src="__TMPL__Public/js/index.js?1"></script>
<style type="text/css">
.op .in{display:none}
.op .out{display:none}
</style>

<script>
$(document).ready(function(){
	//登录
	var id = $.cookie('id');
	var username =$.cookie('name');
	if(id > 0){
		$(".op .in").show();
		if(username != ''){
			$('#username').text(username);
		}
	}else{
		$(".op .out").show();
	}
	//搜索
	var web_path=$('#web_path').text();
	<?php if(isset($album)): ?>$('.search #album').addClass('cur').siblings().removeClass('cur');
		$(".search form").attr('action',web_path+'index.php?a=album&m=Search&g=Home');
		$('#a').val('album');<?php endif; ?>
	
	$(".search li").click(function(){
		$(this).addClass('cur').siblings().removeClass('cur');
		var a = $(this).attr('id');
		$(".search form").attr('action',web_path+'index.php?a='+a+'&m=Search&g=Home');
		$('#a').val(a);
	})

	var key = $(".btn_txt").attr('placeholder');
	
	$(".search_btn_txt").focus(function(){
		if($(".search_btn_txt").val() == key){
			$(this).val('');
		}
	});
	
	$(".search_btn_txt").blur(function(){
		if($(".search_btn_txt").val() == ''){
			$(this).val(key);
		}
	});
});
$(function(){
		var nav_top = $('.nav_offsetTop').offset().top; 
		$show_nav = function() {
		var st = $(document).scrollTop();
		if(st > nav_top){
			$("#header_fixed").show();
		}else{
			$("#header_fixed").hide();
		}
	};
	$(window).bind("scroll", $show_nav);
})
$(function(){
	var nav_top = $('.nav_offsetTop').offset().top; 
	var st = $(document).scrollTop();
	if(st > nav_top){
		$("#header_fixed").show();
	}else{
		$("#header_fixed").hide();
	}
})
</script>

</head>
<body>
<div id="web_path" style="display:none;"><?php echo C('web_path');?></div>
  <div class="nav_main" id="header_fixed">
    <div class="fm970">
      <ul class="fl cl">
        <li class=<?php if('index' == $curpage): ?>cur<?php endif; ?>><a href="<?php echo C('site_domain');?>">首页</a></li>
		<li class=<?php if('album' == $curpage): ?>cur<?php endif; ?>><a href="<?php echo get_url('index','','album');?>">专辑</a></li>
		<?php if(is_array($p_cate_list)): $i = 0; $__LIST__ = $p_cate_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vop): $mod = ($i % 2 );++$i;?><li class=<?php if($vop['id'] == $id): ?>cur<?php endif; ?>><a href="<?php echo get_url('index',$vop['id'],'cate');?>"><?php echo ($vop["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
      </ul>
      <ul class="op">
			<li class="out"><a href="<?php echo get_url('register','','user');?>"><b>注册</b></a>|<a href="<?php echo get_url('login','','user');?>"><b>登录</b></a></li>
			<li class="out"><a class="t_sina" href="<?php echo get_url('sinalogin','','user');?>" target="_blank"><i>微博登录</i></a></li>
			<li class="out"><a class="t_qz" href="<?php echo get_url('qqlogin','','user');?>" target="_blank"><i>QQ登录</i></a></li>
			<li class="out"><a class="t_tb" href="<?php echo get_url('taobaologin','','user');?>" target="_blank"><i>淘宝登录</i></a></li>

			<li class="in">欢迎您<a href="<?php echo get_url('index','','user');?>"><b id="username"><?php echo ($nav_user_info["name"]); ?></b></a></li>
			<li class="in"><a href="<?php echo get_url('release','','user');?>"><i>发布分享</i></a></li>
	        <li class="in"><a href="<?php echo get_url('account','','user');?>">个人设置</a></li>
			<li class="in" ><a href="<?php echo get_url('logout','','user');?>">退出</a></li>		
      </ul>
    </div>
    <div class="clear"></div>
  </div>

<div class="header">
  <div class="info_bar">
   <div class="fm970">
       <h1 class="logo"></h1>
      <div class="search">
        <ul>
          <li class="cur" id="index">单品</li>
          <li class="" id="album">专辑</li>
        </ul>
        <div class="data s_item">
		 <form action="<?php echo get_url('index','','search');?>" method="get">
		 	<input id="a" name="a" type="hidden" value="index">
			<input name="m" type="hidden" value="Search">
			<input name="g" type="hidden" value="Home">
			<input type="text" name="keywords" class="btn_txt search_btn_txt" id="keywd" value="<?php if(isset($keywords)): echo ($keywords); else: echo C('default_kw'); endif; ?>" placeholder="<?php echo C('default_kw');?>" autoComplete= "Off"/>
			<input type="image" src="__TMPL__Public/img/btn_search.gif"/>
		 </form>
        </div>
      </div>
      <div class="au_box">
		<div class="nav_sina_fo_btn fl">
<!-- Baidu Button BEGIN -->
    <div id="bdshare" class="bdshare_b" style="line-height: 12px;"><img src="http://share.baidu.com/static/images/type-button-5.jpg" />
		<a class="shareCount"></a>
	</div>
<script type="text/javascript" id="bdshare_js" data="type=button" ></script>
<script type="text/javascript" id="bdshell_js"></script>
<script type="text/javascript">
	document.getElementById("bdshell_js").src = "http://share.baidu.com/static/js/shell_v2.js?cdnversion=" + new Date().getHours();
</script>
<!-- Baidu Button END -->
         </div>
	  </div>
    </div>
  </div>
  <div class="nav_main nav_offsetTop">
    <div class="fm970">
      <ul class="fl cl">
        <li class=<?php if('index' == $curpage): ?>cur<?php endif; ?>><a href="<?php echo C('site_domain');?>">首页</a></li>
		<li class=<?php if('album' == $curpage): ?>cur<?php endif; ?>><a href="<?php echo get_url('index','','album');?>">专辑</a></li>
		<?php if(is_array($p_cate_list)): $i = 0; $__LIST__ = $p_cate_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vop): $mod = ($i % 2 );++$i;?><li class=<?php if($vop['id'] == $id): ?>cur<?php endif; ?>><a href="<?php echo get_url('index',$vop['id'],'cate');?>"><?php echo ($vop["name"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
      </ul>
      <ul class="op">
			<li class="out"><a href="<?php echo get_url('register','','user');?>"><b>注册</b></a>|<a href="<?php echo get_url('login','','user');?>"><b>登录</b></a></li>
			<li class="out"><a class="t_sina" href="<?php echo get_url('sinalogin','','user');?>" target="_blank"><i>微博登录</i></a></li>
			<li class="out"><a class="t_qz" href="<?php echo get_url('qqlogin','','user');?>" target="_blank"><i>QQ登录</i></a></li>
			<li class="out"><a class="t_tb" href="<?php echo get_url('taobaologin','','user');?>" target="_blank"><i>淘宝登录</i></a></li>

			<li class="in">欢迎您<a href="<?php echo get_url('index','','user');?>"><b id="username"><?php echo ($nav_user_info["name"]); ?></b></a></li>
			<li class="in"><a href="<?php echo get_url('release','','user');?>"><i>发布分享</i></a></li>
	        <li class="in"><a href="<?php echo get_url('account','','user');?>">个人设置</a></li>
			<li class="in" ><a href="<?php echo get_url('logout','','user');?>">退出</a></li>		
      </ul>
    </div>
    <div class="clear"></div>
  </div>
</div>


<div class="wrap">
  <div class="ihome clearfix r5">
    <div class="ihome_main">
		<div class="tit_share tit_share_uc"> <strong><em>专辑</em><i class="num">(<?php echo ($count); ?>)</i></strong></div>
		<?php if(get_ad(5) != ''): ?><center> <div style="width:650px;height:90px;overflow:hidden;margin-bottom:15px;"><?php echo get_ad(5);?></div></center><?php endif; ?>
<?php if(is_array($album_list)): $i = 0; $__LIST__ = $album_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voA): $mod = ($i % 2 );++$i;?><div class="iqingdan">
          <div class="demol_qk r5">
            <h3><?php echo ($voA["title"]); ?><em>（<?php if($voA['items_count'] == ''): ?>0<?php else: echo ($voA["items_count"]); endif; ?>个收藏）</em>&nbsp;
			<em>时间：<?php echo (date('Y-m-d H:i:s',$voA["add_time"])); ?></em><em style="float:right"><a href="<?php echo get_url('albumDetail',$voA['id'],'user');?>">点击进入</a></em></h3>
            <div class="meta"><span class="time"></span>&nbsp;&nbsp;
              <p><?php echo ($voA["info"]); ?></p>
            </div>
            <dl>
              <dt>
			  <!-- <?php if(is_array($voA['items'])): $i = 0; $__LIST__ = array_slice($voA['items'],0,1,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voItems): $mod = ($i % 2 );++$i;?><a href="<?php echo get_url('index',$voItems['id'],'item');?>"><?php if($voItems['img'] != ''): ?><img id="album_item_bimg" src="<?php echo (get_img($voItems["img"],210)); ?>" width="200"><?php else: ?><img src="__TMPL__Public/img/undefined.jpg" width="200"/><?php endif; ?></a><?php endforeach; endif; else: echo "" ;endif; ?>-->

			  <a href="<?php echo get_url('index',$voA['cover']['id'],'item');?>"><?php if($voA['cover']['img'] != ''): ?><img id="album_item_bimg" src="<?php echo (get_img($voA["cover"]["img"],210)); ?>" width="200"><?php else: ?><img src="__TMPL__Public/img/undefined.jpg" width="200"/><?php endif; ?></a>
			  <span>元素：
			  <?php if(is_array($voA['tags'])): $i = 0; $__LIST__ = $voA['tags'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voTags): $mod = ($i % 2 );++$i;?><a href="<?php echo get_url('tag',$voTags['id'],'cate');?>"><?php echo ($voTags["name"]); ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
			  </span></dt>
              <dd> 
			  <?php if(is_array($voA['items'])): $i = 0; $__LIST__ = array_slice($voA['items'],0,8,true);if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voItems): $mod = ($i % 2 );++$i;?><a href="<?php echo get_url('index',$voItems['id'],'item');?>"><?php if($voItems['img'] != ''): ?><img src="<?php echo (get_img($voItems["img"],100)); ?>" width="100"><?php else: ?><img src="__TMPL__Public/img/undefined.jpg" width="100"/><?php endif; ?></a><?php endforeach; endif; else: echo "" ;endif; ?>
                <div class="op"><span class="like"></span></div>
              </dd>
            </dl>
          </div>
        </div><?php endforeach; endif; else: echo "" ;endif; ?>
 <div class="page"><?php echo ($page); ?></div>
 <?php if(get_ad(6) != ''): ?><center> <div style="width:650px;height:90px;overflow:hidden;"><?php echo get_ad(6);?></div></center><?php endif; ?>
    </div>
    <div class="ihome_sub">

		  <div class="uc_nav">
			  <ul>
			  <?php if(is_array($album_cate_list)): $i = 0; $__LIST__ = $album_cate_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voAlbumCate): $mod = ($i % 2 );++$i;?><li class=<?php if($voAlbumCate['id'] == $albumCid): ?>cur<?php endif; ?>><a class="s1" href="<?php echo get_url('index',$voAlbumCate['id'],'album');?>"><?php echo ($voAlbumCate["title"]); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
			  </ul>
		  </div>
		  <div class="hr"></div>
		  <div class="groups">
	<div class="title">
	  <h3>周人气榜</h3>
	</div>
	<div class="ihuodong">
	  <?php if(is_array($items_by_likes)): $i = 0; $__LIST__ = $items_by_likes;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voByL): $mod = ($i % 2 );++$i;?><dl>
		<dt class="bgload"><a href="<?php echo get_url('index',$voByL['id'],'item');?>"><?php if($voByL['img'] != ''): ?><img src="<?php echo (get_img($voByL["img"],100)); ?>" title="<?php echo ($voByL["title"]); ?>"/><?php else: ?><img title="<?php echo ($voByL["title"]); ?>" src="__TMPL__Public/img/undefined.jpg" width="60"/><?php endif; ?></a></dt>
		<dd><a class="hc" href="<?php echo get_url('index',$voByL['id'],'item');?>"><?php echo (msubstr($voByL["title"],0,5,'utf-8',false)); ?></a></dd>
	  </dl><?php endforeach; endif; else: echo "" ;endif; ?>
	</div>
</div>
<div class="hr"></div>
<div class="groups">
	<div class="title">
	  <h3>周排行榜</h3>
	</div>
	<div class="ihuodong">
	<?php if(is_array($items_by_comments)): $i = 0; $__LIST__ = $items_by_comments;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voByC): $mod = ($i % 2 );++$i;?><dl>
		<dt class="bgload"><a href="<?php echo get_url('index',$voByC['id'],'item');?>"><?php if($voByC['img'] != ''): ?><img src="<?php echo (get_img($voByC["img"],100)); ?>" title="<?php echo ($voByC["title"]); ?>"/><?php else: ?><img title="<?php echo ($voByC["title"]); ?>" src="__TMPL__Public/img/undefined.jpg" width="60"/><?php endif; ?></a></dt>
		<dd><a class="hc" href="<?php echo get_url('index',$voByC['id'],'item');?>"><?php echo (msubstr($voByC["title"],0,5,'utf-8',false)); ?></a></dd>
	  </dl><?php endforeach; endif; else: echo "" ;endif; ?>
	</div>
</div>
<?php if(isset($item_id)): if(get_ad(8) != ''): ?><div class="hr"></div>
<center> <div style="width:250px;height:250px;overflow:hidden"><?php echo get_ad(8);?></div></center><?php endif; endif; ?>
      </div>
  </div>
</div>
<div class="sitemap">
  <dl>
    <dt>网站地图</dt>
    <?php if(is_array($p_cate_list)): $i = 0; $__LIST__ = $p_cate_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$cval): $mod = ($i % 2 );++$i;?><dd><a href="<?php echo get_url('index',$cval['id'],'cate');?>">发现<?php echo ($cval["name"]); ?></a></dd><?php endforeach; endif; else: echo "" ;endif; ?>
  </dl>
  <dl>
    <dt>关注我们</dt>
    <dd><?php echo strclean(C('follow_us')); ?></dd>
    <dd><?php echo strclean(C('follow_us2')); ?></dd>
    <dd><?php echo strclean(C('follow_us3')); ?></dd>
    <dd><?php echo strclean(C('follow_us4')); ?></dd>
    <dd><?php echo strclean(C('follow_us5')); ?></dd>
    <dd><?php echo strclean(C('follow_us6')); ?></dd>
  </dl>
  <dl>
    <dt></dt>
    <dd><a href="<?php echo C('site_domain');?>"><img src="__PUBLIC__/statics/images/logo_bot.gif" width="120"></a></dd>
  </dl>
  <dl>
    <dt>网站相关</dt>
    <dd><a href="__PUBLIC__/statics/sitemap.html" target="_blank">网站地图</a></dd>
    <dd><a href="__PUBLIC__/statics/sitemap.xml" target="_blank">sitemap</a></dd>
    <dd><?php echo strclean(C('site_icp')); ?></dd>
    <dd><?php echo strclean(C('statistics_code')); ?></dd>
  </dl>
  <dl>
    <dt>友情链接</dt>
	  <?php if(is_array($linkList)): $i = 0; $__LIST__ = $linkList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$val): $mod = ($i % 2 );++$i;?><dd><a href="<?php echo ($val["url"]); ?>" target="_blank"><?php echo ($val["name"]); ?></a></dd><?php endforeach; endif; else: echo "" ;endif; ?>
  </dl>
</div>
<div style="display:none;" id="gotopbtn" class="back2top"><a href="javascript:void(0);"></a></div>
<script type="text/javascript">
$(function() {
		$(".back2top").click(function() {
			$("html, body").animate({ scrollTop: 0 }, 120);
	}), $backToTopFun = function() {
		var st = $(document).scrollTop(), winh = $(window).height();
		(st > 0)? $(".back2top").show(): $(".back2top").hide();    
		//IE6下的定位
		if (!window.XMLHttpRequest) {
			$(".back2top").css("top", st + winh - 166);    
		}
	};
	$(window).bind("scroll", $backToTopFun);
	$(function() { $backToTopFun(); });
});
</script>
<!--[if lte IE 6]>
<script src="__TMPL__Public/js/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('div.au span,div.au i,span.au span,span.au i,h1.logo');</script>
<![endif]-->
</body>
</html>